package com.android.Translator.View;

import com.android.Translator.R;
import com.android.Translator.Presenter.TranslatorPresenter;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.view.View.OnClickListener;

public class AddWordGroup extends Activity{

	EditText m_EditGroupName;
	Button 	 m_ButtonAddGroup;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.add_word_group);
		
		initView();
	}
	private void initView() {
		// TODO Auto-generated method stub
		m_EditGroupName = (EditText) findViewById(R.id.editGroup);
		m_ButtonAddGroup = (Button) findViewById(R.id.btnAdd);
		
		m_ButtonAddGroup.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				TranslatorPresenter.AddGroup(AddWordGroup.this, m_EditGroupName.getText()+"");
				finish();
			}
		});
	}
}
